"""


    PAL DJConsole Mk2

    This remote script let you use the Hercules DJ Console Mk2
    to perform live mix on Live.

"""


def create_instance(c_instance):
    """
    This is called when you set the "Control Surface" to PAL_DJConsole_Mk2"
    
    """
    import Mk2Control
    return Mk2Control.Mk2Control( c_instance, name='DJConsole_Mk2' )
    
def Test():
    """
    Test the PAL_DJConsole_Mk2 module using a mocked Live and
    a mocked _Framework
    """
    import sys,os
    sys.path.insert(0,os.path.join('.','..'))
    print "######", sys.path

    print "Testing..."
    import PAL.LiveMock as Live
    pal = create_instance( Live.c_instance() )
    pal.disconnect()
    print "Ok."
    
if __name__ == "__main__":
    """
    This is called only when you run this file in a python interpreter.
    I use it to validate code syntaxe and run tests.
    """
    Test()
